<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>上传渠道名称</title>
  <script src="https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/jquery"></script>
  <script src="__PUBLIC__/script/bootstrap-treeview-master/dist/bootstrap-treeview.min.js"></script>
  <link rel="stylesheet" href="__PUBLIC__/node_modules/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="__PUBLIC__/style/base.css">
  <link rel="stylesheet" href="__PUBLIC__/style/manage.css">
  <style>
    .title {font-size:2rem;margin-bottom: 2rem;}
    .download a{float: right;text-decoration: underline;line-height:3rem;color:#ccc;font-size: 1.2rem;text-decoration-color: #ccc;}
    th,td {text-align:center;font-size:1.4rem;line-height: 2.5rem;width: 10rem;margin-left:1rem;border: 1px solid #ccc;}
    #upload_button {cursor: pointer;}
    label:hover {text-decoration: underline;cursor: pointer;}
  </style>
</head>
<body>
  <div style="display:none">
    <form autocomplete="off" action="{:U('Uploads/upload')}" method="post" id="form"
      enctype="multipart/form-data">
      <input type="file" name="file" id="file">
    </form>
  </div>
    <div class="container-fluid">
      <div class="row">
          <header class="col-xs-6 col-md-2 account_name"><img class='img-responsive' src="__PUBLIC__/images/logo_long.jpg" alt=""></header>
      </div>
      <!-- 左侧栏 -->
      <div class="col-md-2 manage_nav_box">
        <iframe src="{:U('Wxauthorise/nav_1')}?local=qudao_name_a" frameborder="0" width="100%" style="height:35rem;"></iframe>
        <!-- 账号选项 -->
        <div class="account_option">
          <a href="{:U('index/update_passwd')}" class="pass_mod">修改密码</a>
          <a href="{:U('index/loginout')}" class="sign_out">退出登录</a>
        </div>
        <!-- end 账号选型 -->
      </div>
      <!-- end 左侧栏 -->

      <!-- 右主体  -->
      <div class="col-md-8">
        <div class="row">
            <div class="main col-xs-6 col-xs-offset-1">
              <div style="height:3rem;"></div>
              <div class="title">Excel批量上传档案<span class="download"><a href="{:U('Uploads/push')}">下载现有渠道名称</a></span></div>
            </div>
        </div>
        <div class="row">
          <div class="col-xs-6 col-xs-offset-1">
            <table style="width:100%;">
              <tbody>
                <tr>
                  <th style='width:33.333%;'>渠道类型</th>
                  <th style='width:33.333%;'>渠道全称</th>
                  <th style='width:33.333%;'>渠道简称</th>
                </tr>
                <tr id="add_new" style="display:table-row;">
                  <td colspan='3' style='width:100%;'><label for="file" style='width:100%;height:100%;margin-bottom:0;'>上传2MB以内excel(要求03、07版office格式)</label></td>
                </tr>
                <tr id="add_new_upload" style="display:table-row;">
                  <td colspan='3' style='width:100%;' id = 'upload_button'>确认上传</td>
                </tr>
                <tr class="normal_data" style="display:none;">
                    <td style='width:33.333%;'>银行</td>
                    <td style='width:33.333%;'>中国银行</td>
                    <td style='width:33.333%;'>中银</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
      <!-- 右主体  -->


    </div>
    <script>
      $('#add_new_upload').css('transform', 'scaleY(0)')
      $('#file').on('change', function () {
        $('#add_new_upload').css('transform', 'scaleY(1)')
      })
      $('#upload_button').on('click', function(){
        $('#form').submit()
      })
      window.addEventListener('message', fromNav, false)
      function fromNav(event) {
        console.log(event.data.url)
        if (event.data.url.length && event.data.url.length > 1) {
          self.location = event.data.url
        }
      }
    </script>
</body>
</html>